/**
 * Created by ls-PC on 2016/7/26.
 */

var moment = require('moment');
module.exports =function(orm,db){

    var Friend =db.define('friend',{
        userId:{ type: 'number',rational : false  },
        friendId:{ type: 'number',rational : false  },
        timeStart:{ type: 'date', required: true, time: true },
        timeEnd:{ type: 'date', required: true, time: true }

    },{
        serialize: function (){
            return{
                id:this.id,
                friendId:this.friendId,
                userId:this.userId,
                timeStart:this.timeStart,
                timeEnd:this.timeEnd
            }
        }
    })

}
